<?php
namespace BP\Sys;

use BP\En\EntityMyPK;

require_once("BP/En/Map.php");
class FrmAttachment extends EntityMyPK {
	public $IsUse;	// boolean
	private function __init() { // default class members
		$this->IsUse =  FALSE ;
	}
	public function getIsVisable () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsVisable,  TRUE );
	}
	public function setIsVisable ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsVisable, $value);
	}
	public function getUploadCtrl () 
	{
		return $this->GetParaInt(FrmAttachmentAttr::$UploadCtrl);
	}
	public function setUploadCtrl ($value) // [int value]
	{
		$this->SetPara(FrmAttachmentAttr::$UploadCtrl, $value);
	}
	public function getNumOfUpload () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$NumOfUpload);
	}
	public function setNumOfUpload ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$NumOfUpload, $value);
	}
	public function getTopNumOfUpload () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$TopNumOfUpload);
	}
	public function setTopNumOfUpload ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$TopNumOfUpload, $value);
	}
	public function getFileMaxSize () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$FileMaxSize);
	}
	public function setFileMaxSize ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$FileMaxSize, $value);
	}
	public function getUploadFileNumCheck () 
	{
		return UploadFileNumCheck->forValue($this->GetValIntByKey(FrmAttachmentAttr::$UploadFileNumCheck));
	}
	public function setUploadFileNumCheck ($value) // [UploadFileNumCheck value]
	{
		$this->SetPara(FrmAttachmentAttr::$UploadFileNumCheck, $value->getValue());
	}
	public function getAthSaveWay () 
	{
		return AthSaveWay->forValue($this->GetValIntByKey(FrmAttachmentAttr::$AthSaveWay));
	}
	public function getFK_Node () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$FK_Node);
	}
	public function setFK_Node ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$FK_Node, $value);
	}
	public function getAthRunModel () 
	{
		return AthRunModel->forValue($this->GetValIntByKey(FrmAttachmentAttr::$AthRunModel));
	}
	public function setAthRunModel ($value) // [AthRunModel value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$AthRunModel, $value->getValue());
	}
	public function getUploadType () 
	{
		return AttachmentUploadType->forValue($this->GetValIntByKey(FrmAttachmentAttr::$UploadType));
	}
	public function setUploadType ($value) // [AttachmentUploadType value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$UploadType, $value->getValue());
	}
	public function getUploadTypeT () 
	{
		if (($this->getUploadType() == AttachmentUploadType::$Multi))
		{
			return "多附�?";
		}
		if (($this->getUploadType() == AttachmentUploadType::$Single))
		{
			return "单附�?";
		}
		if (($this->getUploadType() == AttachmentUploadType::$Specifically))
		{
			return "指定�?";
		}
		return "XXXXX";
	}
	public function getIsUpload () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsUpload);
	}
	public function setIsUpload ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsUpload, $value);
	}
	public function getIsDownload () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsDownload);
	}
	public function setIsDownload ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsDownload, $value);
	}
	public function getHisDeleteWay () 
	{
		return AthDeleteWay->forValue($this->GetValIntByKey(FrmAttachmentAttr::$DeleteWay));
	}
	public function setHisDeleteWay ($value) // [AthDeleteWay value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$DeleteWay, $value->getValue());
	}
	public function getIsOrder () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsOrder);
	}
	public function setIsOrder ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsOrder, $value);
	}
	public function getIsAutoSize () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsAutoSize);
	}
	public function setIsAutoSize ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsAutoSize, $value);
	}
	public function getIsShowTitle () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsShowTitle);
	}
	public function setIsShowTitle ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsShowTitle, $value);
	}
	public function getIsNodeSheet () 
	{
		if (($this->getFK_MapData()->startsWith("ND") ==  TRUE ))
		{
			return  TRUE ;
		}
		return  FALSE ;
	}
	public function getIsNote () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsNote);
	}
	public function setIsNote ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsNote, $value);
	}
	public function getIsExpCol () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsExpCol);
	}
	public function setIsExpCol ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsExpCol, $value);
	}
	public function getName () 
	{
		$str = $this->GetValStringByKey(FrmAttachmentAttr::$Name);
		if (($DataType->IsNullOrEmpty($str) ==  TRUE ))
		{
			$str = "未命�?";
		}
		return $str;
	}
	public function setName ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$Name, $value);
	}
	public function getSort () 
	{
		return $this->GetValStringByKey(FrmAttachmentAttr::$Sort);
	}
	public function setSort ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$Sort, $value);
	}
	public function getExts () 
	{
		return $this->GetValStringByKey(FrmAttachmentAttr::$Exts);
	}
	public function setExts ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$Exts, $value);
	}
	public function getSaveTo () 
	{
		if (($this->getAthSaveWay() == AthSaveWay::$WebServer))
		{
			$s = $this->GetValStringByKey(FrmAttachmentAttr::$SaveTo);
			if ((($s . NULL) . $s->equals("")))
			{
				$s = (((SystemConfig::getPathOfDataUser() . "\\UploadFile\\") . $this->getFK_MapData()) . "\\");
			}
			return $s;
		}
		if (($this->getAthSaveWay() == AthSaveWay::$FTPServer))
		{
			$s = $this->GetValStringByKey(FrmAttachmentAttr::$SaveTo);
			if ((($s . NULL) . $s->equals("")))
			{
				$s = (("//" . $this->getFK_MapData()) . "//");
			}
			return $s;
		}
		return $this->getFK_MapData();
	}
	public function setSaveTo ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$SaveTo, $value);
	}
	public function getDataRefNoOfObj () 
	{
		$str = $this->GetValStringByKey(FrmAttachmentAttr::$DataRefNoOfObj);
		if ($str->equals(""))
		{
			$str = $this->getNoOfObj();
		}
		return $str;
	}
	public function setDataRefNoOfObj ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$DataRefNoOfObj, $value);
	}
	public function getNoOfObj () 
	{
		return $this->GetValStringByKey(FrmAttachmentAttr::$NoOfObj);
	}
	public function setNoOfObj ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$NoOfObj, $value);
	}
	public function getY () 
	{
		return $this->GetValFloatByKey(FrmAttachmentAttr::$Y);
	}
	public function setY ($value) // [float value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$Y, $value);
	}
	public function getX () 
	{
		return $this->GetValFloatByKey(FrmAttachmentAttr::$X);
	}
	public function setX ($value) // [float value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$X, $value);
	}
	public function getW () 
	{
		return $this->GetValFloatByKey(FrmAttachmentAttr::$W);
	}
	public function setW ($value) // [float value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$W, $value);
	}
	public function getH () 
	{
		return $this->GetValFloatByKey(FrmAttachmentAttr::$H);
	}
	public function setH ($value) // [float value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$H, $value);
	}
	public function getGroupID () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$GroupID);
	}
	public function setGroupID ($value) // [long value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$GroupID, $value);
	}
	public function getReadRole () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$ReadRole);
	}
	public function setReadRole ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$ReadRole, $value);
	}
	public function getRowIdx () 
	{
		return $this->GetValIntByKey(FrmAttachmentAttr::$RowIdx);
	}
	public function setRowIdx ($value) // [int value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$RowIdx, $value);
	}
	public function getHisCtrlWay () 
	{
		return AthCtrlWay->forValue($this->GetValIntByKey(FrmAttachmentAttr::$CtrlWay));
	}
	public function setHisCtrlWay ($value) // [AthCtrlWay value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$CtrlWay, $value->getValue());
	}
	public function getIsHeLiuHuiZong () 
	{
		return $this->GetParaBoolen(FrmAttachmentAttr::$IsHeLiuHuiZong);
	}
	public function setIsHeLiuHuiZong ($value) // [boolean value]
	{
		$this->SetPara(FrmAttachmentAttr::$IsHeLiuHuiZong, $value);
	}
	public function getIsToHeLiuHZ () 
	{
		return $this->GetParaBoolen(FrmAttachmentAttr::$IsToHeLiuHZ);
	}
	public function setIsToHeLiuHZ ($value) // [boolean value]
	{
		$this->SetPara(FrmAttachmentAttr::$IsToHeLiuHZ, $value);
	}
	public function getFileShowWay () 
	{
		return FileShowWay->forValue($this->GetParaInt(FrmAttachmentAttr::$FileShowWay));
	}
	public function setFileShowWay ($value) // [FileShowWay value]
	{
		$this->SetPara(FrmAttachmentAttr::$FileShowWay, $value->getValue());
	}
	public function getAthUploadWay () 
	{
		return AthUploadWay->forValue($this->GetValIntByKey(FrmAttachmentAttr::$AthUploadWay));
	}
	public function setAthUploadWay ($value) // [AthUploadWay value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$AthUploadWay, $value->getValue());
	}
	public function getFK_MapData () 
	{
		return $this->GetValStrByKey(FrmAttachmentAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$FK_MapData, $value);
	}
	public function getIsRowLock () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsRowLock,  FALSE );
	}
	public function setIsRowLock ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsRowLock, $value);
	}
	public function getIsWoEnablePrint () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnablePrint);
	}
	public function setIsWoEnablePrint ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnablePrint, $value);
	}
	public function getIsWoEnableReadonly () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableReadonly);
	}
	public function setIsWoEnableReadonly ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableReadonly, $value);
	}
	public function getIsWoEnableRevise () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableRevise);
	}
	public function setIsWoEnableRevise ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableRevise, $value);
	}
	public function getIsWoEnableSave () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableSave);
	}
	public function setIsWoEnableSave ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableSave, $value);
	}
	public function getIsWoEnableViewKeepMark () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableViewKeepMark);
	}
	public function setIsWoEnableViewKeepMark ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableViewKeepMark, $value);
	}
	public function getIsWoEnableWF () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableWF);
	}
	public function setIsWoEnableWF ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableWF, $value);
	}
	public function getIsWoEnableOver () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableOver);
	}
	public function setIsWoEnableOver ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableOver, $value);
	}
	public function getIsWoEnableSeal () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableSeal);
	}
	public function setIsWoEnableSeal ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableSeal, $value);
	}
	public function getIsWoEnableTemplete () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableTemplete);
	}
	public function setIsWoEnableTemplete ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableTemplete, $value);
	}
	public function getIsWoEnableCheck () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableCheck);
	}
	public function setIsWoEnableCheck ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableCheck, $value);
	}
	public function getIsWoEnableInsertFlow () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableInsertFlow);
	}
	public function setIsWoEnableInsertFlow ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableInsertFlow, $value);
	}
	public function getIsWoEnableInsertFengXian () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableInsertFengXian);
	}
	public function setIsWoEnableInsertFengXian ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableInsertFengXian, $value);
	}
	public function getIsWoEnableMarks () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableMarks);
	}
	public function setIsWoEnableMarks ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableMarks, $value);
	}
	public function getIsWoEnableDown () 
	{
		return $this->GetValBooleanByKey(FrmAttachmentAttr::$IsWoEnableDown);
	}
	public function setIsWoEnableDown ($value) // [boolean value]
	{
		$this->SetValByKey(FrmAttachmentAttr::$IsWoEnableDown, $value);
	}
	public function getFastKeyIsEnable () 
	{
		return $this->GetParaBoolen(FrmAttachmentAttr::$FastKeyIsEnable);
	}
	public function setFastKeyIsEnable ($value) // [boolean value]
	{
		$this->SetPara(FrmAttachmentAttr::$FastKeyIsEnable, $value);
	}
	public function getFastKeyGenerRole () 
	{
		return $this->GetParaString(FrmAttachmentAttr::$FastKeyGenerRole);
	}
	public function setFastKeyGenerRole ($value) // [String value]
	{
		$this->SetPara(FrmAttachmentAttr::$FastKeyGenerRole, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		$me->__init();
		return $me;
	}
	public static function constructor__String ($mypk) // [String mypk]
	{
		$me = new self();
		$me->__init();
		$me->setMyPK($mypk);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_FrmAttachment", "附件");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->IndexField = FrmAttachmentAttr::$FK_MapData;
		$map->AddMyPK();
		$map->AddTBString(FrmAttachmentAttr::$FK_MapData, NULL, "表单ID",  TRUE ,  FALSE , 1, 100, 20);
		$map->AddTBString(FrmAttachmentAttr::$NoOfObj, NULL, "附件编号",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBInt(FrmAttachmentAttr::$FK_Node, 0, "节点控制(对sln有效)",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$AthRunModel, 0, "运行模式",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$AthSaveWay, 0, "保存方式",  FALSE ,  FALSE );
		$map->AddTBString(FrmAttachmentAttr::$Name, NULL, "名称",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmAttachmentAttr::$Exts, NULL, "要求上传的格�?",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBInt(FrmAttachmentAttr::$NumOfUpload, 0, "�?小上传数�?",  TRUE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$TopNumOfUpload, 99, "�?大上传数�?",  TRUE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$FileMaxSize, 10240, "附件�?大限�?(KB)",  TRUE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$UploadFileNumCheck, 0, "上传校验方式",  TRUE ,  FALSE );
		$map->AddTBString(FrmAttachmentAttr::$SaveTo, NULL, "保存�?",  TRUE ,  FALSE , 0, 150, 20);
		$map->AddTBString(FrmAttachmentAttr::$Sort, NULL, "类别(可为�?)",  TRUE ,  FALSE , 0, 500, 20);
		$map->AddTBFloat(FrmAttachmentAttr::$X, 5, "X",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmAttachmentAttr::$Y, 5, "Y",  FALSE ,  FALSE );
		$map->AddTBFloat(FrmAttachmentAttr::$W, 40, "TBWidth",  FALSE ,  FALSE );
		$map->AddTBFloat(FrmAttachmentAttr::$H, 150, "H",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsUpload,  TRUE , "是否可以上传",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsVisable,  TRUE , "是否可见",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$FileType, 0, "附件类型",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$DeleteWay, 0, "附件删除规则(0=不能删除1=删除�?�?2=只能删除自己上传�?",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsDownload,  TRUE , "是否可以下载",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsOrder,  FALSE , "是否可以排序",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsAutoSize,  TRUE , "自动控制大小",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsNote,  TRUE , "是否增加备注",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsExpCol,  FALSE , "是否启用扩展�?",  FALSE ,  FALSE );
		$map->AddBoolean(FrmAttachmentAttr::$IsShowTitle,  TRUE , "是否显示标题�?",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$UploadType, 0, "上传类型0单个1多个2指定",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$CtrlWay, 0, "控制呈现控制方式0=PK,1=FID,2=ParentID",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$AthUploadWay, 0, "控制上传控制方式0=继承模式,1=协作模式.",  FALSE ,  FALSE );
		$map->AddTBInt(FrmAttachmentAttr::$ReadRole, 0, "阅读规则",  TRUE ,  TRUE );
		$map->AddTBString(FrmAttachmentAttr::$DataRefNoOfObj, NULL, "数据引用组件ID",  TRUE ,  FALSE , 0, 150, 20,  TRUE , NULL);
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableWF,  TRUE , "是否启用weboffice",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableSave,  TRUE , "是否启用保存",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableReadonly,  TRUE , "是否只读",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableRevise,  TRUE , "是否启用修订",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableViewKeepMark,  TRUE , "是否查看用户留痕",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnablePrint,  TRUE , "是否打印",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableOver,  TRUE , "是否启用套红",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableSeal,  TRUE , "是否启用签章",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableTemplete,  FALSE , "是否启用模板文件",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableCheck,  TRUE , "是否记录节点信息",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableInsertFlow,  TRUE , "是否启用插入流程",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableInsertFengXian,  TRUE , "是否启用插入风险�?",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableMarks,  TRUE , "是否进入留痕模式",  TRUE ,  TRUE );
		$map->AddBoolean(FrmAttachmentAttr::$IsWoEnableDown,  TRUE , "是否启用下载",  TRUE ,  TRUE );
		$map->AddTBAtParas(3000);
		$map->AddTBInt(FrmAttachmentAttr::$GroupID, 0, "GroupID",  FALSE ,  FALSE );
		$map->AddTBString(FrmAttachmentAttr::$GUID, NULL, "GUID",  TRUE ,  FALSE , 0, 128, 20);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		if (($this->getFK_Node() == 0))
		{
			if ((!$DataType->IsNullOrEmpty($this->getNoOfObj()) && $this->getNoOfObj()->contains($this->getFK_MapData())))
			{
				$this->setMyPK($this->getNoOfObj());
			}
			else
			{
				$this->setMyPK((($this->getFK_MapData() . "_") . $this->getNoOfObj()));
			}
		}
		else
		{
			$this->setMyPK((((($this->getFK_MapData() . "_") . $this->getNoOfObj()) . "_") . $this->getFK_Node()));
		}
		return parent->beforeUpdateInsertAction();
	}
	protected function beforeInsert () 
	{
		$this->setIsWoEnableWF( TRUE );
		$this->setIsWoEnableSave( FALSE );
		$this->setIsWoEnableReadonly( FALSE );
		$this->setIsWoEnableRevise( FALSE );
		$this->setIsWoEnableViewKeepMark( FALSE );
		$this->setIsWoEnablePrint( FALSE );
		$this->setIsWoEnableOver( FALSE );
		$this->setIsWoEnableSeal( FALSE );
		$this->setIsWoEnableTemplete( FALSE );
		if (($this->getFK_Node() == 0))
		{
			$this->setMyPK((($this->getFK_MapData() . "_") . $this->getNoOfObj()));
		}
		else
		{
			$this->setMyPK((((($this->getFK_MapData() . "_") . $this->getNoOfObj()) . "_") . $this->getFK_Node()));
		}
		if (($this->getFK_Node() != 0))
		{
			$this->setHisCtrlWay(AthCtrlWay::$WorkID);
		}
		return parent->beforeInsert();
	}
	protected function afterInsert () 
	{
		$gf = GroupField::constructor__();
		if (($gf->IsExit(GroupFieldAttr::$CtrlID, $this->getMyPK()) ==  FALSE ))
		{
			$gf->setFrmID($this->getFK_MapData());
			$gf->setCtrlID($this->getMyPK());
			$gf->setCtrlType("Ath");
			$gf->setLab($this->getName());
			$gf->setIdx(0);
			$gf->Insert();
		}
		parent->afterInsert();
	}
	protected function afterDelete () 
	{
		$gf = GroupField::constructor__();
		$gf->Delete(GroupFieldAttr::$CtrlID, $this->getMyPK());
		parent->afterDelete();
	}
}
?>
